package com.ruoyi.basicData.service.impl;

import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basicData.mapper.StorManagementMapper;
import com.ruoyi.basicData.domain.StorManagement;
import com.ruoyi.basicData.service.IStorManagementService;

/**
 * 库位管理Service业务层处理
 * 
 * @author admin
 * @date 2024-06-26
 */
@Service
public class StorManagementServiceImpl implements IStorManagementService 
{
    @Autowired
    private StorManagementMapper storManagementMapper;

    /**
     * 查询库位管理
     * 
     * @param storManagementId 库位管理主键
     * @return 库位管理
     */
    @Override
    public StorManagement selectStorManagementByStorManagementId(Long storManagementId)
    {
        return storManagementMapper.selectStorManagementByStorManagementId(storManagementId);
    }

    /**
     * 查询库位管理列表
     * 
     * @param storManagement 库位管理
     * @return 库位管理
     */
    @Override
    public List<StorManagement> selectStorManagementList(StorManagement storManagement)
    {
        return storManagementMapper.selectStorManagementList(storManagement);
    }

    /**
     * 新增库位管理
     * 
     * @param storManagement 库位管理
     * @return 结果
     */
    @Override
    public int insertStorManagement(StorManagement storManagement)
    {
      storManagement.setCreateTime(new Date());
        return storManagementMapper.insertStorManagement(storManagement);
    }

    /**
     * 修改库位管理
     * 
     * @param storManagement 库位管理
     * @return 结果
     */
    @Override
    public int updateStorManagement(StorManagement storManagement)
    {
        return storManagementMapper.updateStorManagement(storManagement);
    }

    /**
     * 批量删除库位管理
     * 
     * @param storManagementIds 需要删除的库位管理主键
     * @return 结果
     */
    @Override
    public int deleteStorManagementByStorManagementIds(Long[] storManagementIds)
    {
        return storManagementMapper.deleteStorManagementByStorManagementIds(storManagementIds);
    }

    /**
     * 删除库位管理信息
     * 
     * @param storManagementId 库位管理主键
     * @return 结果
     */
    @Override
    public int deleteStorManagementByStorManagementId(Long storManagementId)
    {
        return storManagementMapper.deleteStorManagementByStorManagementId(storManagementId);
    }
}
